package cn.wolfcode.p2p.business.service;

import cn.wolfcode.p2p.base.domain.Account;
import cn.wolfcode.p2p.business.domain.PaymentSchedule;

import java.math.BigDecimal;

public interface IAccountFlowService {

    /**
     * 创建充值流水
     *
     * @param account
     * @param amount
     */
    void createAccountFlow(Account account, BigDecimal amount);

    /**
     * 创建投标冻结流水
     */
    void createBidFreezedFlow(Account account, BigDecimal amount, String bidRequestTitle);

    /**
     * 创建投标解冻流水
     *
     * @param bidAccount
     * @param availableAmount
     * @param bidRequestTitle
     */
    void createAccountErrorFlow(Account bidAccount, BigDecimal availableAmount, String bidRequestTitle);

    /**
     * 创建成功投标流水
     *
     * @param bidAccount
     * @param availableAmount
     * @param title
     */
    void createBidSuccessFlow(Account bidAccount, BigDecimal availableAmount, String title);

    /**
     * 创建成功借款流水
     *
     * @param borrowUser
     * @param bidRequestAmount
     * @param title
     */
    void createBorrowSuccessFlow(Account borrowUser, BigDecimal bidRequestAmount, String title);

    /**
     * 创建借款手续费流水
     *
     * @param borrowUser
     * @param accountManagementCharge
     * @param title
     */
    void createPayAccountManagementChargeFlow(Account borrowUser, BigDecimal accountManagementCharge, String title);

    /**
     * 创建当期还款成功流水
     *
     * @param borrowAccount
     * @param returnAmount
     * @param bidRequestTitle
     */
    void createReturnMoneySuccessFlow(Account borrowAccount, BigDecimal returnAmount, String bidRequestTitle);

    /**
     * 创建当期收款成功流水
     * @param bidAccount
     * @param totalAmount
     * @param ps
     */
    void createReceiveMonetSuccessFlow(Account bidAccount, BigDecimal totalAmount, PaymentSchedule ps);

    /**
     * 创建当期支付平台手续费流水
     * @param bidAccount
     * @param interestManagerCharge
     * @param ps
     */
    void createPayInterestManageCharge(Account bidAccount, BigDecimal interestManagerCharge, PaymentSchedule ps);

    /**
     * 创建债权标转让成功流水
     * @param transferFromAccount
     * @param bidRequestAmount
     * @param bidRequestTitle
     */
    void createTransferSuccessFlow(Account transferFromAccount, BigDecimal bidRequestAmount, String bidRequestTitle);

    /**
     * 创建债权标认购成功流水
     * @param transferToAccount
     * @param bidRequestAmount
     * @param bidRequestTitle
     */
    void createSubscribeSuccessFlow(Account transferToAccount, BigDecimal bidRequestAmount, String bidRequestTitle);

    /**
     * 创建线上充值成功流水
     * @param account
     * @param amount
     */
    void createRechargeOnlineFlow(Account account, BigDecimal amount);
}
